package com.erb.service.llb;

import com.erb.entity.*;

import java.util.List;

public interface IOtherService {
	//更新用户余额
	int updateUserBalance(int id, Double balance);

	//添加资金记录
	int addCapitalLog(CapitalLog capitalLog);

	//更新项目已投
	int updateProductHaveMoney(int id, Double haveMoney);

	//更新项目状态
	int updateProductStatus(int pid, int status);

	//查询该项目的所有投资
	List<Invest> findInvestByPro(Pager pager, int pid);

	int findTotalInvestByPro(int pid);

	//查询用户支付密码
	int findPayPassByUid(int uid);

	//查找用户
	User findUserById(int id);

	//该用户的所有投资
	int countInvest(int uid);

	//前五投资
	List<UserCount> topFiveInvest();

	//前五收益
	List<UserCount> topFiveProfit();

	//查询红包
	Redpacketrecord findRedById(int rid);

	//查询用户红包
	List<Redpacketrecord> findRedByUser(int uid, Integer rtype, Integer ptype, Integer state);

	//更新红包状态
	int updateRedState(int id, int state, String exchangeTime);

	//查询累计收益
	Double sumProfit();

	Integer todayExchange(int uid, int gid);

	int addRecord(IntegralGoodsRecord record);

	int addRedPacket(Redpacketrecord redpacketrecord);

	Integer userIntegral(int uid);
}
